Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for a custom message on output #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GCHQDeveloper911
Copy link

Added an optional message that can be passed with the call to checka11y after the skipFailures bool. This message will be set to either the message if supplied, or if not, the context if supplied, or a blank string if not. This is then passed to the violations callback, so the user has the option to do something with it when reporting violations, to allow for friendlier messaging, especially to help distinguish one call to checka11y from another.

Copy link
Member

@sapegin sapegin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request!

  1. I'm thinking about a new API for the next major release, and probably we'll need to replace all positional arguments of checkA11y with an object because we already have way too many and they are all optional.
  2. The name of the parameter. Maybe name or label would be more clear?

I'll keep this pull request as a reference, and either include in the new version or ask you to rebase it on top of it.

@sapegin sapegin added this to the 1.0.0: New API milestone Oct 26, 2020
@sapegin sapegin mentioned this pull request Nov 11, 2020
@sapegin
Copy link
Member

sapegin commented Nov 11, 2020

I drafted my ideas on the new API: #75. I hope this covers your use case — let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants